import request from '../request'
export default {
  index() {
    return request({
      url: '/admin/document/index',
      method: 'get'
    })
  },
  create(data) {
    return request({
      url: '/admin/document/create',
      method: 'post',
      data
    })
  },
  update(data) {
    return request({
      url: '/admin/document/update',
      method: 'post',
      data
    })
  },
  info(id) {
    return request({
      url: '/admin/document/info',
      method: 'get',
      params: {
        id
      }
    })
  },
  delete(id) {
    return request({
      url: '/admin/document/delete',
      method: 'get',
      params: {
        id
      }
    })
  },
  append(data) {
    return request({
      url: '/admin/document/append',
      method: 'post',
      data
    })
  },
  relation(params) {
    return request({
      url: '/admin/document/relation',
      method: 'get',
      params
    })
  }
}
